<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<script>
    function go() {
        document.getElementById("iframe1").src = document.getElementById("url").value;
    }
</script>
<body>

<input type="text" id="url" value="https://www.bilibili.com/">
<input type="button" value="提交" onclick="go()">

<div>
    <iframe id="iframe1" style="width: 100%;height: 500px"></iframe>
</div>
</body>
</html>